//----------------------------------Include-------------------------------------
#include "mcu.h"
#include "board.h"
//------------------------------------------------------------------------------

//--------------------------------Public Func-----------------------------------
void brd_init(void)
{
  mcu_int_disable();
  mcu_sys_clock();
  mcu_init_systick();
  
  mcu_init_do();
  mcu_init_di();
  
  mcu_init_tim0();          //for NB uart
  mcu_init_tim1();
  mcu_init_tim2();          //for CH4 uart
  mcu_init_tim3();          //for GPS uart
  
  mcu_init_uart1(115200);   //u1--dbg
  mcu_init_uart2(115200);   //u2--CH4
  mcu_init_uart3(9600);     //u3--GPS
  mcu_init_uart0(9600);     //u0--NB

  mcu_init_i2c();
  mcu_init_spi0();

  mcu_init_adc();

  mcu_init_sleep();
  mcu_int_enable();
}
//------------------------------------EOF---------------------------------------



